package com.fh.modules.kms.controller;

import com.fh.common.api.vo.Result;
import com.fh.common.aspect.annotation.AutoLog;
import com.fh.common.constant.CommonConstant;
import com.fh.modules.kms.entity.Knowledge;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.*;

/**
 * @Author qiujunda
 * @Date 03/06/2020
 * @Description
 */
@Log4j2
//@RestController
//@RequestMapping("/kms")
public class KmsCoreController {

    @PostMapping("/knowladge")
    @ApiOperation("新增一条知识-测试")
    @AutoLog(value = "新增一条知识", logType = CommonConstant.LOG_TYPE_ACTION)
    public Result addKnowledge(@RequestBody Knowledge knowledge){

        return Result.ok("新增成功");
    }

    @PutMapping("/knowladge")
    @ApiOperation("修改一条知识-测试")
    @AutoLog(value = "修改一条知识", logType = CommonConstant.LOG_TYPE_ACTION)
    public Result updateKnowledge(@RequestBody Knowledge knowledge){
        return Result.ok("修改一条知识");
    }
}
